#ifndef __DATPARSER__H__
#define __DATPARSER__H__

#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

struct dat_node
{
	struct dat_node *next;
	char label[64];
	char value[64];
};

struct dat_stu
{
	char filename[64];
	off_t filesize;
	int node;
	struct dat_node *first;
};

extern void dat_dump(struct dat_stu *head);
extern int dat_set_lable(struct dat_stu *head, char *label, char *value, int v_size);
extern void dat_free(struct dat_stu **head);
extern int dat_save(char *filename, struct dat_stu *head);
extern int dat_load(char *filename, struct dat_stu **head);

#ifdef __cplusplus
}
#endif

#endif